package org.jin.samples.model;

import java.io.Serializable;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name="exam_user_role")
public class RoleUser implements Serializable{
	private static final long serialVersionUID = 1L;
	@Id
	@ManyToOne(cascade = {CascadeType.DETACH, CascadeType.PERSIST, CascadeType.MERGE})
	@JoinColumn(name="role_id")
	private ExamRole role;
	
	@Id
	@ManyToOne(cascade = {CascadeType.DETACH, CascadeType.PERSIST, CascadeType.MERGE})
	@JoinColumn(name="user_id")
	private ExamUser user;


	public ExamRole getRole() {
		return role;
	}

	public void setRole(ExamRole role) {
		this.role = role;
	}

	public ExamUser getUser() {
		return user;
	}

	public void setUser(ExamUser user) {
		this.user = user;
	}

	


	
	
}
